
<%@ page language="java" %>

<%@ page import="java.util.ArrayList,
                 com.scalar.chiptrack.utils.ConfigManager"%>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<chiptrack:checkLogon sourcePage="/jsp/operations/lot_shipping.jsp"/>

<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<html:html locale="true">

<HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>
</HEAD>
<BODY bgColor="#ffffff" leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<SCRIPT language="JavaScript">
function loadProcessSteps() {
    if (document.lotShippingForm.productId.value != -1) {
        formAction = "<%=chipTracContext%>/lotShipping.do?action=loadProcessSteps";
        document.lotShippingForm.action=formAction;
        document.lotShippingForm.submit();
    }
}

function loadLots() {
    formAction = "<%=chipTracContext%>/lotShipping.do?action=loadLots";
    document.lotShippingForm.action=formAction;
    document.lotShippingForm.submit();
}

function searchLots() {
    formAction = "<%=chipTracContext%>/lotShipping.do?action=searchLots";
    document.lotShippingForm.action=formAction;
    document.lotShippingForm.submit();
}

function getLotInfo() {
    if (document.lotShippingForm.lotNumberToView.value != -1) {
        formAction = "<%=chipTracContext%>/lotShipping.do?action=viewLotInfo";   //lotNumber=" + document.lotShippingForm.lotNumberToView.value;
        document.lotShippingForm.action=formAction;
        document.lotShippingForm.submit();
    }
}

</SCRIPT>

<!-- Top Header Start-->
<%@include file="/jsp/includes/header.jsp"  %>
<!-- Top Header End-->

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
	<td width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>

        <!-- Side Navigation start -->
        <%@include file="/jsp/operations/operations_menu.jsp" %>
        <!-- end of the side navigations -->

<TD bgcolor="#ffffff">
<IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
<TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
<TD valign="top" width="100%">

<IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
<BR>


<!-- BODY STARTS HERE -->

<center><span class="NArialW">Lot Shipping Instructions</span></center>
<img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10>

<table border="0" width="90%" align=right>
<tr><td>

<html:form name="lotShippingForm" type="com.scalar.chiptrack.lotshipping.forms.LotShippingForm" action="/lotShipping.do?action=loadLots">

    <table border="0" width="100%" align=right>

        <tr><td colspan='2'><chiptrack:errors styleClass="NArialL"/></td></tr>
        <tr><td colspan='2'><chiptrack:info styleClass="NArialL"/></td></tr>
        <tr><td colspan='2'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>

        <tr>
            <td><font class='NArialL'>Marketing Product:&nbsp;&nbsp;</font>
                <html:select name="lotShippingForm" property="productId" onchange="loadProcessSteps()" styleClass="NArialL">
                <html:option value="-1">-- Select Product --</html:option>
                <html:options collection="marketingProductList" property="value" labelProperty="label"/>
                </html:select>
            </td>
        </tr>

        <tr>
            <td><logic:notEqual name="lotShippingForm" property="productId" value="-1">
            <font class='NArialL'>Process Steps for this Product:&nbsp;&nbsp;</font>
                <html:select name="lotShippingForm" property="processStep" styleClass="NArialL">
                <html:option value="-1">-- Select Process Step Type --</html:option>
                <html:options collection="processStepList" property="value" labelProperty="label"/>
                </html:select>

                &nbsp;&nbsp;<a href="javascript:loadLots()"><image border="0" src="<%=chipTracContext%>/jsp/includes/images/submit.gif" onMouseOver="window.status='Click here to load Lot Information';return true">
            </logic:notEqual></td>
        </tr>

        <tr><td><font class="NArialL">(or)</font><IMG height=20 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td></tr>

        <tr>
            <td>
                <font class="NArialL">Enter Lot Number:&nbsp;&nbsp;</font>
                <html:text name="lotShippingForm" property="lotNumber" size='20' maxlength='20' styleClass="txfield"/>&nbsp;&nbsp;
                <a href="javascript:searchLots()"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/search.gif" onMouseOver="window.status='Click here to start search';return true">
            </td>
        </tr>

        <tr><td><img height=40 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td></tr><tr><td>

        <tr><td>
            <logic:present name="lotList">
                <font class='NArialL'>All Active Lots:&nbsp;&nbsp;</font>
                <html:select name="lotShippingForm" property="lotNumberToView" styleClass="NArialL">
                <html:option value="-1">-- Select Lot Number --</html:option>
                <html:options collection="lotList" property="lotNumber"/>
                </html:select>

                &nbsp;&nbsp;<a href="javascript:getLotInfo()"><image border="0" src="<%=chipTracContext%>/jsp/includes/images/submit.gif" onMouseOver="window.status='Click here to view Lot Information';return true">
            </logic:present>
        </td></tr>

    </table>

</html:form>

</td></tr>

</table>


<!-- till here -->
<BR><BR><BR></TD>
<TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
</TR>
</TABLE>

<!-- Footer starts here -->
<%@include file="/jsp/includes/footer.jsp" %>
<!-- footer end here -->

</body>

</html:html>
